﻿#include "Program.h"
#include "LibraryEditor.LMain.h"

namespace LibraryEditor
{

std::string Program::openFileWith = "";

    std::string Program::getOpenFileWith()
    {
        return openFileWith;
    }

    void Program::setOpenFileWith(const std::string &value)
    {
        openFileWith = value;
    }

    void Program::Main(std::vector<std::string> &args)
    {
        if (args.size() == 1)
        {
            FileInfo *file = new FileInfo(args[0]);
            if (file->Exists)
            {
                setOpenFileWith(args[0]);
            }

            delete file;
        }

        Application::EnableVisualStyles();
        Application::SetCompatibleTextRenderingDefault(false);
        LMain tempVar();
        Application::Run(&tempVar);
    }
}
